While starting my layout from scratch, I have come up against something that is taking me a long time to figure out and I can't find exactly what I want on google. Here is the html layout:
Expand|Select|Wrap|Line Numbers
- <div id="top_menu">
- <div id="nav">
- <ul>
- <li><a href="#">Home</a>
- <ul>
- <li><a href="#"><span>Home</span></a></li>
- <li><a href="#"><span>Forums</span></a></li>
- </ul>
- </li>
- ...
- </ul>
- </div>
- </div>
Expand|Select|Wrap|Line Numbers
- #top_menu {
- height: 60px;
- width: 100%;
- overflow: hidden;
- margin: 0 auto;
- background: gray url(top_menu_bg.png) repeat-x;
- display: block;
- text-align: center;
- border: 2px gray ridge;
- border-left: none;
- border-right: none;
- font-size: 16px;
- }
- #nav {
- width: 100%;
- }
- #nav ul {
- width: 800px;
- margin: 0 auto;
- display: block;
- }
- #nav ul ul {
- font-size: 14px;
- margin-top: 10px;
- }
- #nav ul ul li {
- display: none;
- height: 20px;
- float: left;
- width: 100px;
- padding-top: 5px;
- }
- #nav ul li {
- height: 30px;
- width: 150px;
- padding-top: 5px;
- float: left;
- list-style: none;
- }
- #nav ul li:hover ul li {
- display: block;
- }
If that doesn't make sense, here is my site and if you just hover on the links you will see what I mean.
Thanks for your help.